$message-margin: 30px;
$message-max-width: 600px;
$chat-bottom-height: 170px;
$bottom-send-height: 36px;
.char-box-im {
  &.readonly {
    .message-box {
      bottom: 5px;
    }
  }
  position: absolute;
  top: 75px;
  bottom: 0;
  left: 210px;
  right: 0;
  .message-box {
    position: absolute;
    top: 0;
    bottom: $chat-bottom-height + 5px;
    left: 0;
    right: 0;
    .message-scrollbar-wrapper {
      overflow-x: hidden;
    }
  }
  .chat-bottom {
    position: absolute;
    height: $chat-bottom-height;
    bottom: 0;
    width: 100%;
    .tools-line {
      height: 24px;
      line-height: 24px;
      padding: 0 15px;
    }
    .textarea {
      height: $chat-bottom-height - 24px -50px;
      width: 100%;
      padding: 15px;
      border: none;
      outline: none;
      resize: none;
    }
    .button {
      text-align: right;
      padding-right: 15px;
      .el-button {
        padding: 6px 12px;
      }
    }
  }
}

.popover-order {
  .goods-img {
    width: 45px;
    height: 45px;
  }

  .order-header-info-table {
    border: 1px solid transparent;

    &.active {
      border: 1px solid green;
    }

    white-space: nowrap;
    text-overflow: ellipsis;

    margin-bottom: 20px;
    width: 100%;

    cursor: pointer;

    .last-message-td {
      padding-right: 10px;
      .last-message-badge {
        border: 1px solid $grey-line;
        display: block;
      }
    }
  }
}

.system-notice-container {

  .user-header {
    height: 45px;
    width: 45px;
  }

  .el-header {
    padding: 0;
  }

  .left-menu {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    padding: 20px 10px;
    width: 220px;
    background-color: white;
    .is-active {
      background-color: $body-background-color;
      color: $--color-primary;
    }
    border-right: 1px solid $grey-line;

    .text-box {
      width: 9em;
      div {
        width: 100%;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
      }
    }

    .left-menu-item {
      cursor: pointer;
      padding: 5px 0;
    }
  }

  .goods-img {
    width: 45px;
    height: 45px;
  }

  .order-header-info {
    position: relative;
    overflow: auto;
    line-height: 18px;
    padding-bottom: 5px;
    z-index: 1; // 要高于下面的消息框
    margin-top: -5px;
    white-space: nowrap;
    text-overflow: ellipsis;
    .change-group {
      position: absolute;
      right: 0;
      top: 0;
      width: 100px;
      height: 45px;
    }
    .order-header-info-table {
      width: 100%;
      td {
        padding-top: 10px;
      }
    }
  }

  .left-menu-scrollbar {
    height: 100%;

    .menu-scrollbar-wrapper {
      overflow-x: hidden;
    }
  }
}

/***
Chats
***/
.chats {
  padding: 0 20px 10px 10px;
  margin-top: 15px;
  li {
    clear: both;
    list-style: none;
    padding-top: 15px;
    .body {
      display: block;
      padding: 10px;
    }
    .avatar {
      height: 45px;
      width: 45px;
      -webkit-border-radius: 50% !important;
      -moz-border-radius: 50% !important;
      border-radius: 50% !important;
    }
    &.time {
      text-align: center;
    }
    &.in {
      .avatar {
        float: left;
        margin-right: 10px;
      }
      .message {
        text-align: left;
        background-color: white;
        margin-left: $message-margin;
        max-width: $message-max-width;
        .arrow {
          display: block;
          position: absolute;
          top: 5px;
          left: -8px;
          width: 0;
          height: 0;
          border-top: 8px solid transparent;
          border-bottom: 8px solid transparent;
          border-right: 8px solid white;
        }
      }
    }
    &.out {
      .avatar {
        float: right;
        margin-left: 10px;
      }
      .message {
        margin-right: $message-margin;
        background-color: #FFF5E8;
        text-align: left;
        max-width: $message-max-width;
        float: right;
        .arrow {
          display: block;
          position: absolute;
          top: 5px;
          right: -8px;
          border-top: 8px solid transparent;
          border-bottom: 8px solid transparent;
          border-left: 8px solid #FFF5E8;
        }
      }
      .name, .datetime {
        text-align: right;
      }
    }
    .name {
      color: #3590c1;
      font-weight: 400;
    }
    .datetime {
      color: #333;
      font-weight: 400;
    }
    .message {
      display: inline-block;
      padding: 5px;
      position: relative;
    }
  }
}
